using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace KbsUmlEditor
{
    class UMLNotitie:UMLObject
    {
        String m_Notitie;

        public String Notitie
        {
            get { return m_Notitie; }
            set { m_Notitie = value; }
        }

        public UMLNotitie(Point beginPositie, Point eindPositie)
            : base(beginPositie, eindPositie)
        {
            m_Notitie = "Geef notitie";
        }

        public override void Teken(Graphics g, double factor, int grid)
        {
            System.Drawing.Pen myPen;
            myPen = new System.Drawing.Pen(System.Drawing.Color.Gray);
            System.Drawing.Graphics formGraphics = g;

            //Teken het kader
            formGraphics.DrawRectangle(myPen, new Rectangle(
                         (int)(base.BeginPositie.X * factor * grid), (int)(base.BeginPositie.Y * factor * grid), (int)((base.EindPositie.X - base.BeginPositie.X) * factor * grid), (int)((base.EindPositie.Y - base.BeginPositie.Y) * factor * grid)));

            //Kies het lettertype
            Font myFont = new Font(FontFamily.GenericSansSerif, 8,
            FontStyle.Regular);

            //Zet de naam vd klasse
            double f1 = (base.BeginPositie.X + 1) * factor * grid;
            double f2 = (base.BeginPositie.Y + 1) * factor * grid;

            formGraphics.DrawString(m_Notitie, myFont,
            Brushes.Firebrick, (int)f1,(int) f2);

            //formGraphics.Dispose();
        }
    }
}
